package DataSetPackage;

import java.util.ArrayList;

public class Attribute {
	String name;
	ArrayList<String> nominals;
	
	public Attribute(String name, ArrayList<String> nominals)
	{
		this.name = name;
		this.nominals = nominals;
	}
	public Attribute(String name)
	{
		this.name = name;
		this.nominals = new ArrayList<String>();
	}
	
	public ArrayList<String> getNominals(){
		return nominals;
	}
	
	public String getName()
	{
		return name;
	}
	public String getNominal(int i)
	{
		return nominals.get(i);
	}
	public int getNominalIndex(String nom)
	{
		for (int i = 0; i < nominals.size(); i++) {
			if(nom.equalsIgnoreCase(nominals.get(i)))
				return i;
		}
		return -1;
	}
	public int getNumberOfNominal()
	{
		return nominals.size();
	}
}
